import bsh.EvalError;
import bsh.Interpreter;

import com.common.Arith;


public class MethTest {

	public static void main(String[] args){
		String str = "dddd*ddd";
		System.out.println(str.replaceAll("\\*", " "));
	}

	/**
	 * @param args
	 * @throws EvalError 
	 */
	public static void main1(String[] args) throws EvalError {
		 
		Interpreter interpreter = new Interpreter(); // 构造一个解释器 
	 
		interpreter.eval("import com.common.Arith;");
		
	     interpreter.eval("double value = 20;" +
	      		"double n1=0.2;" +
	      		"double n2=1.2;" +
	      		"value =  Arith.sub(value-n1,n2); "); // 对一段脚本求值，并得到结果
	      Double yj = (Double) interpreter.get("value");
	      System.out.println(yj);

	}

}
